From: Paul Eggert Date: Tue, 5 Jul 2011 03:09:36 +0000 (-0700) Subject: * lisp.h (struct vectorlike_header, struct Lisp_Subr): Signed sizes. X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1~1^2~324^2~2464^2~115 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=762462c46564461d3af3f9b704c20b1c76df72dd;p=emacs.git * lisp.h (struct vectorlike_header, struct Lisp_Subr): Signed sizes. Use EMACS_INT, not EMACS_UINT, for sizes. The code works equally well either way, and we prefer signed to unsigned. --- diff --git a/src/ChangeLog b/src/ChangeLog index ff1f47eb015..c64618d03c0 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,9 @@ 2011-07-05 Paul Eggert + * lisp.h (struct vectorlike_header, struct Lisp_Subr): Signed sizes. + Use EMACS_INT, not EMACS_UINT, for sizes. The code works equally + well either way, and we prefer signed to unsigned. + Random fixes. E.g., (random) never returned negative values. * fns.c (Frandom): Use GET_EMACS_TIME for random seed, and add the subseconds part to the entropy, as that's a bit more random. diff --git a/src/lisp.h b/src/lisp.h index 762d34abb9c..2835302947f 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -833,7 +833,7 @@ struct Lisp_String . */ struct vectorlike_header { - EMACS_UINT size; + EMACS_INT size; /* Pointer to the next vector-like object. It is generally a buffer or a Lisp_Vector alias, so for convenience it is a union instead of a @@ -1028,7 +1028,7 @@ struct Lisp_Bool_Vector struct Lisp_Subr { - EMACS_UINT size; + EMACS_INT size; union { Lisp_Object (*a0) (void); Lisp_Object (*a1) (Lisp_Object);